package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.library.common.GeoPoint;
import com.njtoyo.taxi.admin.mapper.master.enums.ScanRidePlatform;
import com.njtoyo.taxi.admin.mapper.master.enums.ScanRideValidateErr;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 扫码行程
 * </p>
 *
 * @author Dell
 * @since 2021-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ScanRide对象", description = "扫码行程")
public class ScanRide implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "乘客Id")
    private Long customerId;

    @ApiModelProperty(value = "司机Id")
    private Long driverId;

    @ApiModelProperty(value = "车辆Id")
    private Long taxiId;

    @ApiModelProperty(value = "公司Id")
    private Long companyId;

    @ApiModelProperty(value = "运营区Id")
    private Long cantonId;

    @ApiModelProperty(value = "司机区域Id")
    private Long driverRegionId;

    @ApiModelProperty(value = "目的地坐标")
    private GeoPoint destination;

    @ApiModelProperty(value = "是否抵扣首单立减优惠")
    private Boolean isDiscountable;

    @ApiModelProperty(value = "司机无奖励原因 0:previous_customer[您已注册过有滴打车],1:duplicate_uuid[您的设备被使用过],2:distance_far[距离过远],3:continuous_area[相同区域],4:once_discounted[您已使用过该优惠],5:no_sale[没有活动],6:non_authorize_locate[乘客没有打开定位],7:had_order[不能使用立减优惠],8:not_in_same_region[司机和乘客不在同一运营区]")
    private ScanRideValidateErr validateErr;

    @ApiModelProperty(value = "是否完成首单立减优惠")
    private Boolean isFinished;

    @ApiModelProperty(value = "司机当前坐标")
    private GeoPoint currentDriverLocate;

    @ApiModelProperty(value = "扫码时间戳")
    private Integer scanTimestamp;

    @ApiModelProperty(value = "来源渠道 0:app[APP],1:wxmina[小程序]")
    private ScanRidePlatform platform;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;


}
